{% extends 'index.html' %}
{% block content %}
    电影
    <div class="card">
        <div class="card-header">
            {#            <h4>Striped table with hover effect</h4>#}
        </div>
        <a class="table-responsive">
            <table class="table table-striped table-hover">
                <thead>

                <tr>
                    <th></th>
                    <th>编号</th>
                    <th>标题</th>
                    <th>预览</th>
                    <th>下载</th>
                </tr>
                </thead>
                <tbody>
                {% for m in movies %}
{#                        {% if forloop.counter|divisibleby:2 %}#}
{#                            <tr style="height: 20px;background-color:#c1da58">#}
{#                                {% elif forloop.counter|divisibleby:1 %}#}
{#                            <tr style="height: 20px;background-color:#da8b3b">#}
{#                        {% endif %}#}
                    <tr>
                    <td></td>
                    <td>{{ forloop.counter }}</td>
                    <td>{{ m.title }}</td>
                    <td><a href="/movie_detail?m3u8url={{ m.m3u8url }}"><img style="height: 150px" src="{{ m.img }}"> </a>
                    </td>
                    <td><a href="#">下载</a></td>
{#                        <td><a href="/downloadm3u8?m3u8url={{ m.url }}">下载</a> </td>#}
                    </tr>
                    {#        {{ m.name }}#}
                    {% if  forloop.last %}

                        <tr>
                            <td style="alignment: center">
                                <div style="float: left">
                                    {% if houses %}
                                        {% if currentpage != 1 %}

                                            <a align="right" href="{% url 'dytt' %}/{{ lastpage }}"
                                               style="alignment: right">
                                                <button>上一页{{ lastpage }}</button>
                                            </a>

                                        {% endif %}
                                    {% endif %}

                            </td>
                            {#                                                        <td colspan="6" align="center">#}
                            <td align="center" colspan="3">
                                <div>当前是第{{ currentpage }}页</div>
                            </td>

                            {#                                                        <td style="alignment: center" colspan="8">#}
                            <td style="alignment: center">
                                <div style="float: right">
                                    {% if movies %}
                                        {% if forloop.counter > 14 %}

                                            <a align="right" href="{% url 'dytt' %}/{{ nextpage }}"
                                               style="alignment: right">
                                                <button>下一页{{ nextpage }}</button>
                                            </a>

                                        {% endif %}
                                    {% endif %}
                                </div>
                            </td>
                        </tr>
                    {% endif %}
                {% endfor %}
                </tbody>
            </table>
        </a>
    </div>
    {#    <br/>#}
    {#    <br/>#}
    {#    <br/>#}
    {#    <br/>#}
    {#    <video width="500" height="500" controls autoplay>#}
    {#      <source src="{{ sd }}" type="video/ogg">#}
    {#      <source src="Z:/迅雷下载/230OREC-422/230OREC-422.mp4" type="video/mp4">#}
    {#      <source src="Z:/迅雷下载/230OREC-422/230OREC-422.mp4.webm" type="video/webm">#}
    {#      <object data="Z:/迅雷下载/230OREC-422/230OREC-422.mp4" width="320" height="240">#}
    {#        <embed width="500" height="500" src="E:/钢之炼金术师/钢之炼金术师第一季/[钢之炼金术师] (1).swf">#}
    {#      </object>#}
    {#    </video>#}
{% endblock %}